<template>
	<view class="apps">
		<uv-grid :col="4" :border="false">
			<uv-grid-item>
				<uv-avatar src="/static/a.png" shape="square" style="margin:20rpx 0 10rpx 0;"></uv-avatar>
				<view  class="title">金融服务</view>
			</uv-grid-item>
			<uv-grid-item>
				<uv-avatar src="/static/b.png" shape="square" style="margin:20rpx 0 10rpx 0;"></uv-avatar>
				<view  class="title">法律服务</view>
			</uv-grid-item>
			<uv-grid-item>
				<uv-avatar src="/static/c.png" shape="square" style="margin:20rpx 0 10rpx 0;"></uv-avatar>
				<view  class="title">工商财税</view>
			</uv-grid-item>
			<uv-grid-item>
				<uv-avatar src="/static/d.png" shape="square" style="margin:20rpx 0 10rpx 0;"></uv-avatar>
				<view  class="title">数智营销</view>
			</uv-grid-item>
		</uv-grid>
	</view>
</template>

<script>
	let app;
	import * as ww from '@wecom/jssdk'
	export default {
		data() {
			return {
				pageLoading:true,
				pageMore:true,
				page:1,
				pageSize:20,
				list:[]
			}
		},
		onLoad(opt) {
			if(opt.token){
				uni.setStorageSync('WeApp_token',opt.token);
			}
			app = this;
			ww.register({
				corpId: 'ww5d7b19c3c1ce8e1f',    // 必填，当前用户企业所属企业ID
				jsApiList: ['hideAllNonBaseMenuItem','hideOptionMenu','createWWLoginPanel'],   
				agentId:'1000006',
				getConfigSignature: async function(){
				  const configData = await app.request({
						url: '/auth',
						data:{'agent_id':''}
					})
					//app.alert(JSON.stringify(configData));
					return configData.data;
				},                
				getAgentConfigSignature: async function(){
					const AgentConf = await app.request({
						url: '/auth',
						data:{'agent_id':'1000006'}
					})
					//app.alert(JSON.stringify(AgentConf));
					return AgentConf.data;
				}
			})
			ww.hideAllNonBaseMenuItem();
			ww.hideOptionMenu();
		},
		onReachBottom() {
			if(app.pageMore){
				app.getlist();
			}
		},
		methods: {
			handle(id){
				uni.navigateTo({
					url:'/pages/detail/detail?id='+id,
				})
			},
		}
	}
</script>

<style scoped>
	
</style>
